import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      redirect:'/index',
      children:[
        {
          path: '/index',
          name: 'qm_index',
          component: () => import('./views/qm/index.vue')
        },
        {
          path: '/cate',
          name: 'qm_cate',
          component: () => import('./views/qm/cate.vue')
        },
        {
          path: '/cart',
          name: 'qm_cart',
          component: () => import('./views/qm/cart.vue')
        },
        {
          path: '/my',
          name: 'qm_my',
          component: () => import('./views/qm/my.vue')
        },
      ]
    },
    {
      path: '/sousuo',
      name: 'qm_sousuo',
      component: () => import('./views/qm/sousuo.vue')
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('./views/About.vue')
    }
  ]
})
